package com.yuda.operationcenter.service.impl;

import java.util.List;
import com.yuda.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yuda.operationcenter.mapper.OperInformationHitsMapper;
import com.yuda.operationcenter.domain.OperInformationHits;
import com.yuda.operationcenter.service.IOperInformationHitsService;

/**
 * 资讯的点击量Service业务层处理
 *
 * @author wyn
 * @date 2021-04-12
 */
@Service
public class OperInformationHitsServiceImpl implements IOperInformationHitsService
{
    @Autowired
    private OperInformationHitsMapper operInformationHitsMapper;

    /**
     * 查询资讯的点击量
     *
     * @param id 资讯的点击量ID
     * @return 资讯的点击量
     */
    @Override
    public OperInformationHits selectOperInformationHitsById(Long id)
    {
        return operInformationHitsMapper.selectOperInformationHitsById(id);
    }

    /**
     * 查询资讯的点击量列表
     *
     * @param operInformationHits 资讯的点击量
     * @return 资讯的点击量
     */
    @Override
    public List<OperInformationHits> selectOperInformationHitsList(OperInformationHits operInformationHits)
    {
        return operInformationHitsMapper.selectOperInformationHitsList(operInformationHits);
    }

    /**
     * 新增资讯的点击量
     *
     * @param operInformationHits 资讯的点击量
     * @return 结果
     */
    @Override
    public int insertOperInformationHits(OperInformationHits operInformationHits)
    {
        operInformationHits.setCreateTime(DateUtils.getNowDate());
        return operInformationHitsMapper.insertOperInformationHits(operInformationHits);
    }

    /**
     * 修改资讯的点击量
     *
     * @param operInformationHits 资讯的点击量
     * @return 结果
     */
    @Override
    public int updateOperInformationHits(OperInformationHits operInformationHits)
    {
        return operInformationHitsMapper.updateOperInformationHits(operInformationHits);
    }

    /**
     * 批量删除资讯的点击量
     *
     * @param ids 需要删除的资讯的点击量ID
     * @return 结果
     */
    @Override
    public int deleteOperInformationHitsByIds(Long[] ids)
    {
        return operInformationHitsMapper.deleteOperInformationHitsByIds(ids);
    }

    /**
     * 删除资讯的点击量信息
     *
     * @param id 资讯的点击量ID
     * @return 结果
     */
    @Override
    public int deleteOperInformationHitsById(Long id)
    {
        return operInformationHitsMapper.deleteOperInformationHitsById(id);
    }
}
